package com.cty.Stack;
/*
*
* 测试链表模拟的栈
* */
public class LinkedListStackDemo {
    public static void main(String[] args) {
        LinkedListStack linkedListStack = new LinkedListStack();
        Node node1 = new Node(1);
        Node node2 = new Node(2);
        Node node3 = new Node(3);
        Node node4 = new Node(4);
        linkedListStack.push(node1);
        linkedListStack.push(node2);
        linkedListStack.push(node3);
        linkedListStack.push(node4);
        linkedListStack.list();
        System.out.println(linkedListStack.pop().no);
        System.out.println(linkedListStack.pop().no);
        System.out.println(linkedListStack.pop().no);
        System.out.println(linkedListStack.pop().no);
//        linkedListStack.pop();
        linkedListStack.list();
    }
}
